package com.chief.part1;

import com.chief.BaseBuilder;

import java.util.function.Function;

public class Activity {

    private final String s1;
    private final String s2;
    private final String s3;

    private final String s20;

    private Activity(Builder builder) {
        s1 = builder.s1;
        s2 = builder.s2;
        s3 = builder.s3;
        s20 = builder.s20;
    }

    public static Activity of(Function<Builder,Builder> fn){
        return fn.apply(new Builder()).build();
    }

    public String s2() {
        return s2;
    }

    public String s3() {
        return s3;
    }

    public String s1() {
        return s1;
    }

    public String s20() {
        return s20;
    }

    public static class Builder implements BaseBuilder<Activity> {
        private String s1;
        private String s2;
        private String s3;
        private String s20;

        public final Builder s1(String s1) {
            this.s1 = s1;
            return this;
        }

        public final Builder s2(String s2) {
            this.s2 = s2;
            return this;
        }

        public final Builder s3(String s3) {
            this.s3 = s3;
            return this;
        }

        public final Builder s20(String s20) {
            this.s20 = s20;
            return this;
        }

        @Override
        public Activity build() {
            return new Activity(this);
        }
    }

    @Override
    public String toString() {
        return "Activity{" +
                "s1='" + s1 + '\'' +
                ", s2='" + s2 + '\'' +
                ", s3='" + s3 + '\'' +
                ", s20='" + s20 + '\'' +
                '}';
    }
}
